package com.xinli.xinlifm.view.activity.find;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.xinli.xinlifm.R;
import com.xinli.xinlifm.view.fragment.find.FindSecondFragment;

public class FindSecondActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_find_second);
        Intent intent = getIntent();
        String tag = intent.getStringExtra("tag");
        int id = intent.getIntExtra("id", -1);
        int type = intent.getIntExtra("type", -1);
        switch (type) {
            case 1:
        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.activity_find_second, FindSecondFragment.newInstance(tag,type))
                .commit();

                break;
            case 2:
                //换一个fragment
//        getSupportFragmentManager()
//                .beginTransaction()
//                .replace(R.id.activity_find_second, FindSecondFragment.newInstance(String.valueOf(id),type))
//                .commit();
                break;
        }
    }
}
